<div class="wechat-page">
    <div class="vote-tab">
        <a href="?project_id=0" class="vote-tab-item <?php echo $nav_project == 0 ? 'vote-tab-item_on' : '' ?>">
            所有
        </a>
        <a href="?project_id=1" class="vote-tab-item <?php echo $nav_project == 1 ? 'vote-tab-item_on' : '' ?>">
            为网页点赞
        </a>
        <a href="?project_id=2" class="vote-tab-item <?php echo $nav_project == 2 ? 'vote-tab-item_on' : '' ?>">
            为游戏点赞
        </a>
    </div>
    <div style="height: 20px;"></div>
    <div>
        <?php if (isset($user) && $user): ?>
            <div style="text-align:center;margin-bottom:20px;">
                <img src="<?= $user->user_avatar ?>" style="width:140px;height:140px;" class="img-circle img-thumbnail">
                <div style="font-size:20px;line-height:30px;"><?= $user->user_name ?></div>
            </div>
            <?php if($nav_project>0 && $allow_count>0):?>
            <div class="modal-wrapper" data-notice-id="index_notice_<?php echo $nav_project;?>" role="dialog">
                <div class="modal-dialog">
                    <div class="modal-dialog-content">对于每个作品每人最多只能点赞1次，您在当前投票项中共有<?=$allow_count?>次点赞机会！</div>
                    <div class="modal-dialog-foot">
                        <a href="javascript:;" data-dismiss="modal" class="modal-dialog-btn modal-dialog-btn_primary">知道了</a>
                    </div>
                </div>
            </div>
            <?php endif; ?>
        <?php endif; ?>
    </div>
    <ul class="media-list vote-list">
        <?php foreach ($vote_list as $vote): ?>
            <li class="media">
                <div class="media-left">
                    <a href="vote/item?id=<?php echo $vote['vote_id']; ?>">
                        <img class="media-object" style="width: 64px; height: 64px;"
                             src="<?php echo $vote['vote_image']; ?>" data-holder-rendered="true">
                    </a>
                </div>
                <div class="media-body">
                    <h4 class="media-heading">
                        <?php echo $vote['vote_name']; ?>
                        <span class="vote-info">人气值:<?php echo $vote['vote_count']; ?></span>
                    </h4>
                    <div class="desc"><?php echo $vote['vote_desc']; ?></div>
                </div>
                <div class="media-right">
                    <?php if ($vote['state'] == 1): ?>
                    <?php endif; ?>
                    <a href="vote/item?id=<?php echo $vote['vote_id']; ?>"
                       class="btn btn-primary btn-sm btn-vote">点击投票</a>
                </div>
            </li>
        <?php endforeach; ?>
    </ul>
</div>